package com.taobao.message.feignclient;

import com.taobao.base.model.RestResponse;

import com.taobao.message.model.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 *远程调用搜索接口
 */
//使用fallback定义降级类是无法拿到熔断异常,使用FallbackFactory可以拿到熔断的异常信息
@FeignClient(value = "me-api",fallbackFactory = UserServiceClientFallbackFactory.class)
public interface UserServiceClient {


    @GetMapping("/me/getUserById/{tbId}")
     RestResponse<UserDto> getUserById(@PathVariable("tbId") String tbId);


}
